package com.bw.liuyushan.zhuangao4_mvptest1.Adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bw.liuyushan.zhuangao4_mvptest1.Entity.ViedoBean;
import com.bw.liuyushan.zhuangao4_mvptest1.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * ZhuanGao4_MVPTest1
 * file name is : ViedoAdapter
 * created by Ender on 2021/8/17 10:16.
 * author : Liuyushan
 * Describe(作用):
 */
public class ViedoAdapter extends BaseQuickAdapter<ViedoBean.DataBean, BaseViewHolder> {
    public ViedoAdapter(@Nullable List<ViedoBean.DataBean> data) {
        super(R.layout.tabsimitem, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, ViedoBean.DataBean dataBean) {
        Glide.with(getContext()).load(dataBean.getVideomainimg()).into((ImageView) baseViewHolder.findView(R.id.img_tab1));
        Glide.with(getContext()).load(dataBean.getHeadpath()).circleCrop().into((ImageView) baseViewHolder.findView(R.id.imgCir_tab1));
        baseViewHolder.setText(R.id.tv_tab1,dataBean.getAuthname());
    }
}
